import allure
import pytest

from page.genshinPage import GenshinPage
from utils.readYamlFile import ReadYamlFile


@allure.feature('主流程回归')
class TestCase001:
    # 获取测试数据
    paramName, paramValue = ReadYamlFile().read('case_001.yaml')

    @allure.title('case_001_原神')
    @pytest.mark.parametrize(paramName, paramValue, ids=['case_001'])
    def test_case_001(self, search, create_page):
        # 初始化page
        page = create_page
        with allure.step('步骤1：登录'):
            GenshinPage(page).baidu().search(search).genshin()
